Skip to content

feat: added downloads tracking separate from huggingface#990

Merged
mkopcins merged 8 commits intomainfrom
@mkopcins/downloads
Mar 25, 2026
Merged

feat: added downloads tracking separate from huggingface#990
mkopcins merged 8 commits intomainfrom
@mkopcins/downloads

Conversation

@mkopcins
Copy link
Copy Markdown
Collaborator

@mkopcins mkopcins commented Mar 23, 2026

Description

Added separate request on model download to track downloads on our managed service. This would allow us to track things like geolocation and have insights on the entire timeline without the need to pay for huggingface premium.

Set up so that it fails silently.

Addtionally added model registry named MODEL_REGISTRY for better model discoverability.

Introduces a breaking change?

  • Yes
  • No

Type of change

  • Bug fix (change which fixes an issue)
  • New feature (change which adds functionality)
  • Documentation update (improves or adds clarity to existing documentation)
  • Other (chores, tests, code style improvements etc.)

Tested on

  • iOS
  • Android

Testing instructions

Screenshots

Related issues

Checklist

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly
  • My changes generate no new warnings

Additional notes

@mkopcins mkopcins force-pushed the @mkopcins/downloads branch from 8910c17 to 65055ef Compare March 24, 2026 13:59
@mkopcins mkopcins force-pushed the @mkopcins/downloads branch from 65055ef to df8b3c7 Compare March 24, 2026 14:03
@mkopcins mkopcins force-pushed the @mkopcins/downloads branch from f660f17 to e0211d9 Compare March 24, 2026 14:41
@mkopcins mkopcins marked this pull request as ready for review March 24, 2026 14:42
@mkopcins mkopcins requested a review from chmjkb March 24, 2026 14:48
@msluszniak
Copy link
Copy Markdown
Member

msluszniak commented Mar 24, 2026

Does this PR closes #612? If so, add Closes #612 in PR template.

@msluszniak msluszniak added the feature PRs that implement a new feature label Mar 24, 2026
* ```
* @category Utils
*/
export const MODEL_REGISTRY = {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think an additional backend layer here would be useful? For now if a model is exported to CoreML, we silently make the user download it. And the user may wish to run the XNNPack model on both platforms for whatever reason.

Copy link
Copy Markdown
Collaborator

@chmjkb chmjkb Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with this structure to keep it simple for now, but I wonder if it's something we want to add in the future relases.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should rather have models named LLAMA3_2_3B_XNNPACK etc. than adding another layer of nesting here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just like you said @chmjkb, this is simple for now, I can even remove the type classification (the main reason for this basic registry is that I need it right now to send proper model name to the database) and that might actually be the correct way to go as that would allow us to extend it later without any braking changes/backward compatibility worries.
As for the structure itself, we had a discussion today with Norbert and we didn't reach common ground on the structure so this is still open question and one we should discuss, I think tomorrow in the office is the best option.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we jot down the conclusion from our discussion today somewhere? cc @mkopcins
I guess a good place would be #612.

@mkopcins
Copy link
Copy Markdown
Collaborator Author

mkopcins commented Mar 24, 2026

Does this PR closes #612? If so, add Closes #612 in PR template.

Not quite, still open question

@mkopcins mkopcins force-pushed the @mkopcins/downloads branch from ea99afc to 5028267 Compare March 25, 2026 13:12
Copy link
Copy Markdown
Collaborator

@chmjkb chmjkb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@mkopcins mkopcins merged commit 2fe49d0 into main Mar 25, 2026
5 checks passed
@mkopcins mkopcins deleted the @mkopcins/downloads branch March 25, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature PRs that implement a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants